package org.prothliberger.net.http.gui;

import javax.swing.JFileChooser;


import org.prothliberger.net.http.HttpServer;

public class MainHttpServerGui {

	public static void main(String[] args) throws Exception {
		// On choisi le web root
		JFileChooser chooser = new JFileChooser();
		//FileNameExtensionFilter filter = new FileNameExtensionFilter(
		//		"JPG & GIF Images", "jpg", "gif");
		//chooser.setFileFilter(filter);
		chooser.setFileSelectionMode(JFileChooser.DIRECTORIES_ONLY);
		int returnVal = chooser.showOpenDialog(null);
		if (returnVal != JFileChooser.APPROVE_OPTION) {
			// cancel, on quitte
			return;
		}

		new HttpServer(chooser.getSelectedFile().getAbsolutePath()).start();

	}

}
